package com.czsth.home.daos;

import com.czsth.home.models.News;
import com.mongodb.DB;
import com.mongodb.MongoClient;
//import org.jongo.Jongo;
//import org.jongo.MongoCollection;
//import org.jongo.MongoCursor;

import java.net.UnknownHostException;

/**
 * Created by bruce on 2015/3/15.
 */
public class JongoDAO {

    public void hello() throws UnknownHostException {
        DB db = new MongoClient().getDB("tianhe");

//        Jongo jongo = new Jongo(db);
//        MongoCollection news = jongo.getCollection("news");
//
//        MongoCursor<News> all = news.find("{name: 'Joe'}").as(News.class);
//        News one = news.findOne("{name: 'Joe'}").as(News.class);
    }

}
